import * as types from '../actionsType'

const initState = {
  channels: [],
}
const article = (state = initState, action) => {
  switch(action.type) {
    case types.GET_CHANNELS: 
      return {
        ...state,
        channels: action.payload
      }
    case types.GET_ARTICLES:
      return {
        ...state,
        ...action.payload
      }
    default: 
    return state
  }
}

export default article